﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Hangjing.Common;
using Hangjing.SQLServerDAL;
using Hangjing.Model;
using System.IO;

/// <summary>
/// 发工资
/// </summary>
public partial class qy_54tss_Admin_Shop_payoff : System.Web.UI.Page
{
    DeliverSalaryLog dal = new DeliverSalaryLog();

    protected void Page_Load(object sender, EventArgs e)
    {
        ValidatorSet validator = new ValidatorSet("Admin");
        validator.SetValidator();
        if (!this.Page.IsPostBack)
        {

        }
    }

    /// <summary>
    /// 发工资
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void in_Click(object sender, EventArgs e)
    {
        string sql = "DATEDIFF(day,starttime,'" + tborderTime.Text + "') =0";
        if (dal.GetCount(sql) > 0)
        {
            AlertScript.RegScript(this, "alert('此月工资记录已经添加，不能重复添加');hideload_super();");//
            return;
        }

        dal.payoff(tborderTime.Text, UserHelp.GetAdmin().AdminName);
        AlertScript.RegScript(this, "alert('操作成功');hideload_super();");//

    }

}
